/* 登录模态框样式 */
.login-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.login-modal.show {
    opacity: 1;
    visibility: visible;
}

.login-dialog {
    background: white;
    border-radius: 12px;
    width: 400px;
    max-width: 90vw;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    transform: scale(0.9) translateY(-20px);
    transition: transform 0.3s ease;
}

.login-modal.show .login-dialog {
    transform: scale(1) translateY(0);
}

.login-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 24px 16px;
    border-bottom: 1px solid #e5e7eb;
}

.login-title {
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.login-close {
    background: none;
    border: none;
    font-size: 16px;
    color: #6b7280;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.login-close:hover {
    background: #f3f4f6;
    color: #374151;
}

.login-content {
    padding: 24px;
}

/* 登录标签切换 */
.login-tabs {
    display: flex;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 4px;
    margin-bottom: 24px;
}

.login-tab {
    flex: 1;
    padding: 10px 16px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.2s ease;
    color: #6b7280;
}

.login-tab.active {
    background: white;
    color: #ff4757;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* 登录表单 */
.login-form {
    display: block;
}

.login-form.hidden {
    display: none;
}

.login-field {
    margin-bottom: 20px;
}

.login-field label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 8px;
}

.login-field input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.login-field input:focus {
    outline: none;
    border-color: #ff4757;
    box-shadow: 0 0 0 3px rgba(255, 71, 87, 0.1);
}

/* 验证码输入组 */
.sms-input-group {
    display: flex;
    gap: 8px;
}

.sms-input-group input {
    flex: 1;
}

.sms-btn {
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: white;
    color: #6b7280;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.sms-btn:hover {
    border-color: #ff4757;
    color: #ff4757;
}

.sms-btn:disabled {
    background: #f3f4f6;
    color: #9ca3af;
    cursor: not-allowed;
}

/* 登录选项 */
.login-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #6b7280;
    cursor: pointer;
}

.remember-me input {
    width: auto;
    margin: 0;
}

.forgot-password {
    font-size: 14px;
    color: #ff4757;
    text-decoration: none;
}

.forgot-password:hover {
    text-decoration: underline;
}

/* 登录按钮 */
.login-btn {
    width: 100%;
    padding: 12px 16px;
    background: #ff4757;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
    margin-bottom: 20px;
}

.login-btn:hover {
    background: #ff3742;
}

.login-btn:disabled {
    background: #d1d5db;
    cursor: not-allowed;
}

/* 游客模式 */
.guest-mode {
    border-top: 1px solid #e5e7eb;
    padding-top: 20px;
}

.guest-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    color: #92400e;
}

.guest-info i {
    color: #f59e0b;
}

.guest-btn {
    width: 100%;
    padding: 10px 16px;
    background: #f3f4f6;
    color: #6b7280;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.guest-btn:hover {
    background: #e5e7eb;
    color: #374151;
}

/* 任务限制提示 */
.task-limit-notice {
    position: fixed;
    top: 50px;
    left: 50%;
    transform: translateX(-50%);
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 8px;
    padding: 12px 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: none;
    animation: slideDown 0.3s ease;
}

.task-limit-notice.show {
    display: block;
}

.notice-content {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #92400e;
}

.notice-content i {
    color: #f59e0b;
}

.notice-content a {
    color: #ff4757;
    text-decoration: none;
    font-weight: 500;
}

.notice-content a:hover {
    text-decoration: underline;
}

.notice-close {
    background: none;
    border: none;
    color: #92400e;
    cursor: pointer;
    padding: 2px;
    margin-left: 8px;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* 注册新用户部分 */
.register-section {
    border-top: 1px solid #e5e7eb;
    padding-top: 20px;
    margin-bottom: 20px;
}

.register-divider {
    text-align: center;
    margin-bottom: 16px;
}

.register-divider span {
    font-size: 14px;
    color: #6b7280;
    background: white;
    padding: 0 12px;
    position: relative;
}

.register-btn {
    width: 100%;
    padding: 12px 16px;
    background: white;
    color: #ff4757;
    border: 2px solid #ff4757;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.register-btn:hover {
    background: #ff4757;
    color: white;
}

.register-btn:active {
    transform: translateY(1px);
}

.register-btn i {
    font-size: 14px;
}

/* 账号设置页面样式 */
.account-logged-in,
.account-guest {
    animation: fadeIn 0.3s ease;
}

/* 账号资料样式 */
.account-profile {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.profile-section {
    display: flex;
    align-items: center;
    gap: 20px;
}

.avatar-upload {
    position: relative;
    text-align: center;
}

.current-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff4757, #ff6b7a);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 32px;
    margin-bottom: 12px;
    box-shadow: 0 4px 12px rgba(255, 71, 87, 0.2);
}

.upload-btn {
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 12px;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.upload-btn:hover {
    border-color: #ff4757;
    color: #ff4757;
}

.profile-info {
    flex: 1;
}

.profile-name,
.profile-email {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.profile-name:last-child,
.profile-email:last-child {
    margin-bottom: 0;
}

.setting-label {
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
}

.setting-value {
    font-size: 14px;
    color: #1f2937;
    font-weight: 600;
}

/* 同步状态样式 */
.sync-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: #f0f9ff;
    border: 1px solid #0ea5e9;
    border-radius: 8px;
    margin-bottom: 12px;
}

.sync-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sync-icon {
    color: #0ea5e9;
    font-size: 18px;
    animation: spin 2s linear infinite;
}

.sync-details {
    display: flex;
    flex-direction: column;
}

.sync-label {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 2px;
}

.sync-time {
    font-size: 14px;
    color: #0ea5e9;
    font-weight: 600;
}

.sync-btn {
    background: #0ea5e9;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.sync-btn:hover {
    background: #0284c7;
}

/* 高级版状态样式 */
.premium-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border: 1px solid #f59e0b;
    border-radius: 8px;
    margin-bottom: 12px;
}

.premium-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.premium-icon {
    color: #f59e0b;
    font-size: 18px;
}

.premium-details {
    display: flex;
    flex-direction: column;
}

.premium-label {
    font-size: 12px;
    color: #92400e;
    margin-bottom: 2px;
}

.premium-time {
    font-size: 14px;
    color: #f59e0b;
    font-weight: 600;
}

.premium-btn {
    background: #f59e0b;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.premium-btn:hover {
    background: #d97706;
}

/* 账号设置按钮样式 */
.account-settings-btn {
    width: 100%;
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 12px;
}

.account-settings-btn:hover {
    background: #e5e7eb;
    border-color: #9ca3af;
}

.logout-btn {
    width: 100%;
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fca5a5;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.logout-btn:hover {
    background: #fecaca;
    border-color: #f87171;
}

/* 游客状态样式 */
.guest-profile {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    margin-bottom: 20px;
}

.guest-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: 24px;
}

.guest-info {
    flex: 1;
}

.guest-name {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 4px;
}

.guest-status {
    font-size: 12px;
    color: #6b7280;
}

/* 游客限制提示 */
.guest-limitation {
    padding: 16px;
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 8px;
    margin-bottom: 20px;
}

.limitation-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.limitation-icon {
    color: #f59e0b;
    font-size: 18px;
}

.limitation-text {
    display: flex;
    flex-direction: column;
}

.limitation-title {
    font-size: 14px;
    font-weight: 600;
    color: #92400e;
    margin-bottom: 2px;
}

.limitation-desc {
    font-size: 12px;
    color: #92400e;
}

/* 登录注册按钮样式 */
.login-btn {
    width: 100%;
    background: #ff4757;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 12px;
}

.login-btn:hover {
    background: #ff3742;
}

.register-btn {
    width: 100%;
    background: white;
    color: #ff4757;
    border: 1px solid #ff4757;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.register-btn:hover {
    background: #ff4757;
    color: white;
}

/* 功能预览样式 */
.guest-benefits {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
}

.guest-benefits h5 {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 16px;
    text-align: center;
}

.benefit-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.benefit-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: white;
    border-radius: 6px;
    font-size: 12px;
    color: #374151;
}

.benefit-item i {
    color: #ff4757;
    font-size: 14px;
    width: 16px;
    text-align: center;
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .profile-section {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }
    
    .sync-status,
    .premium-status {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
    
    .sync-btn,
    .premium-btn {
        width: 100%;
        justify-content: center;
    }
    
    .benefit-list {
        grid-template-columns: 1fr;
    }
    
    .profile-name,
    .profile-email {
        flex-direction: column;
        gap: 4px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .current-avatar {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }
    
    .guest-avatar {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .account-profile,
    .guest-benefits {
        padding: 16px;
    }
}